{extend name="Public/base"/}
{block name="body"}
<div class="main-box clearfix">
	<header class="main-box-header clearfix">
		<div class="pull-left">
			<h2>广告位添加</h2>
		</div>
	</header>
	<div class="main-box-body clearfix">
		<form action="{:U()}" method="post" class="form form-horizontal">
			<div class="form-group">
				<label class="col-lg-2 control-label">广告位名称</label>
				<div class="col-lg-6">
					<input type="text" class="form-control" name="title" value="{$info.title|default=''}">
				</div>
			</div>
			<div class="form-group">
				<label class="col-lg-2 control-label">当前标识</label>
				<div class="col-lg-6">
					<input type="text" class="form-control" name="name" value="{$info.name|default=''}">
					<span class="help-block">（当前标识）</span>
				</div>
			</div>
			<div class="form-group">
				<label class="col-lg-2 control-label">展示方式</label>
				<div class="col-lg-6">
					<select name="show_type" class="form-control">
						<option value="1" selected>幻灯片</option>
						<option value="2">对联</option>
						<option value="3">图文列表</option>
						<option value="4">文字列表</option>
						<option value="5">代码广告</option>
					</select>
					<span class="help-block col-lg-12">（代码广告位只能有一条广告，对联广告只能有两条，如果超过数额，根据时间先后选择后更新的数据）</span>
				</div>
			</div>

			<div class="form-group">
				<label class="col-lg-2 control-label">开始时间</label>
				<div class="col-lg-5">
					<input type="text" class="form-control" name="start_time" value="{$info.start_time|default=''}">
				</div>
			</div>
			<div class="form-group">
				<label class="col-lg-2 control-label">结束时间</label>
				<div class="col-lg-5">
					<input type="text" class="form-control" name="end_time" value="{$info.end_time|default=''}">
				</select>	
			</div>
		</div>
		<div class="form-group">
			<label class="col-lg-2 control-label">创建时间</label>
			<div class="col-lg-5">
				<input type="text" class="form-control" name="create_time" value="{$info.create_time|default=''}">
			</div>
		</div>
		<div class="form-group">
			<label class="col-lg-2 control-label">修改时间</label>
			<div class="col-lg-5">
				<input type="text" class="form-control" name="update_time" value="{$info.update_time|default=''}">
			</div>
		</div>
		<div class="form-group">
			<label class="col-lg-2 control-label">状态</label>
			<div class="col-lg-2">
				<select name="status" class="form-control">
						<option value="0" >关闭</option>
						<option value="1" {eq name="info.status" value="1"}selected{/eq}>开启
				</select>
			</div>
		</div>
		<div class="form-group">
			<label class="col-lg-2 control-label">广告位模板</label>
			<div class="col-lg-6">
				<input type="text" class="form-control" name="template" value="{$info.template}">
				<span class="help-block">（您可以在广告文件（./Application/Home/View/Default/Ad/）下创建新的广告模板）</span>
			</div>
		</div>

		<div class="form-group">
			<div class="col-lg-offset-2 col-lg-10">
				<input type="hidden" name="id" value="{$info.id|default=''}">
				<button class="btn btn-success submit-btn ajax-post" type="submit" target-form="form-horizontal">确 定</button>
				<button class="btn btn-danger btn-return" onclick="javascript:history.back(-1);return false;">返 回</button>
			</div>
		</div>
	</form>
</div>
</div>
{/block}